package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.Data;

/**
 * @program: cs-mall_35th
 * @description:
 * @author: Weiwei Liu
 * @create: 2021-12-12 16:11
 **/
@Data
public class LoginMemberRequest extends AbstractRequest {
    private String username;
    private String password;

    @Override
    public void requestCheck() {
        if (username == null || password == null) {
            throw new ValidateException(
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getCode(),
                    SysRetCodeConstants.REQUEST_CHECK_FAILURE.getMessage());
        }
    }
}
